package com.ysd.lis.controller.sys;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.dto.SysCommDto;
import com.ysd.lis.dto.SysCommParam;
import com.ysd.lis.entity.SysCampusArea;
import com.ysd.lis.service.SysCampusAreaService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author prs
 * @since 2025-02-20
 */
@RestController
@RequestMapping("/api/sys/campusArea")
public class SysCampusAreaController extends BaseController {

    @Autowired
    SysCampusAreaService sysCampusAreaService;

    @ApiOperation("不分页查询")
    @GetMapping("/findCampusAreaList")
    public Result findCampusAreaList(SysCommParam param) {
        return sysCampusAreaService.findCampusAreaList(param);
    }

    @ApiOperation("分页查询")
    @GetMapping("/findCampusAreaPageList")
    public Result findCampusAreaPageList(SysCommParam param) {
        return sysCampusAreaService.findCampusAreaPageList(param);
    }

    @ApiOperation("新增")
    @PostMapping("/addCampusArea")
    public Result addCampusArea(@RequestBody SysCampusArea sysCampusArea) {
        return sysCampusAreaService.addCampusArea(sysCampusArea);
    }

    @ApiOperation("修改")
    @PostMapping("/editCampusArea")
    public Result editCampusArea(@RequestBody SysCampusArea supplier) {
        return sysCampusAreaService.editCampusArea(supplier);
    }

    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteCampusArea")
    public Result batchDeleteCampusArea(@RequestBody SysCommDto dto) {
        return sysCampusAreaService.batchDeleteCampusArea(dto);
    }

}
